package com.osce.basic.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csce.domain.entity.basic.BasicExPlace;
import com.osce.basic.mapper.BasicExPlaceMapper;
import com.osce.common.utils.DateUtils;
import com.osce.interfaces.basic.IBasicExPlaceService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * 考站表Service业务层处理
 *
 * @author zzx
 * @since 2023-07-18
 */
@Service
public class BasicExPlaceServiceImpl extends ServiceImpl<BasicExPlaceMapper, BasicExPlace> implements IBasicExPlaceService {


    /**
     * 查询考站表
     *
     * @param id 考站表主键
     * @return 考站表
     */
    @Override
    public BasicExPlace selectBasicExPlaceById(Long id) {
        return baseMapper.selectBasicExPlaceById(id);
    }

    /**
     * 查询考站表列表
     *
     * @param basicExPlace 考站表
     * @return 考站表
     */
    @Override
    public List<BasicExPlace> selectBasicExPlaceList(BasicExPlace basicExPlace) {
        return baseMapper.selectBasicExPlaceList(basicExPlace);
    }

    /**
     * 新增考站表
     *
     * @param basicExPlace 考站表
     * @return 结果
     */
    @Override
    public int insertBasicExPlace(BasicExPlace basicExPlace) {
        basicExPlace.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertBasicExPlace(basicExPlace);
    }

    /**
     * 修改考站表
     *
     * @param basicExPlace 考站表
     * @return 结果
     */
    @Override
    public int updateBasicExPlace(BasicExPlace basicExPlace) {
        return baseMapper.updateBasicExPlace(basicExPlace);
    }

    /**
     * 批量删除考站表
     *
     * @param ids 需要删除的考站表主键
     * @return 结果
     */
    @Override
    public int deleteBasicExPlaceByIds(Long[] ids) {
        return baseMapper.deleteBasicExPlaceByIds(ids);
    }

    /**
     * 删除考站表信息
     *
     * @param id 考站表主键
     * @return 结果
     */
    @Override
    public int deleteBasicExPlaceById(Long id) {
        return baseMapper.deleteBasicExPlaceById(id);
    }

    @Override
    public List<BasicExPlace> selectBasicExPlaceListByIds(Collection<Long> allPlaceIds) {
        return baseMapper.selectBasicExPlaceListByIds(allPlaceIds);
    }
}
